package com.concerneyes.mine.adapter.serviceCentre;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.concerneyes.R;
import com.concerneyes.mine.model.MyServiceCentreModel;

import java.util.List;

import common.BASE_Adapter;

/**
 * Created by Administrator on 2017/6/21 0021.
 */

public class CommonProblemAdapter extends BASE_Adapter<MyServiceCentreModel> {
    private Context context;
    private boolean isShop;
    private List<MyServiceCentreModel> data;

    public CommonProblemAdapter(Context context) {
        super(context);
    }

    public CommonProblemAdapter(Context context, boolean isShop, List<MyServiceCentreModel> data) {
        super(context, data);
        this.context = context;
        this.isShop = isShop;
        this.data = data;
    }

    @Override
    public View createView(LayoutInflater inflater, int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            holder = new ViewHolder();
            convertView = inflater.inflate(R.layout.item_server_center, null);
            holder.tvName = (TextView) convertView.findViewById(R.id.tv_me_title);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
            holder.tvName.setText(data.get(position).getTitle());
        return convertView;
    }


    class ViewHolder {
        TextView tvName;
    }
}
